import { axios } from '@/utils/request'

// 查询仓库列表
export const queryWarehouseList = (params) => {
  return axios({
    url: '/bms/bmsWarehouse/list',
    method:'get',
    params
  })
}

// 查询仓库过道列表
export const queryWarehouseAisleList = (params) => {
  return axios({
    url: '/bms/bmsWarehouseAisle/list',
    method:'get',
    params
  })
}

// 查询库区列表
export const queryWarehouseRegionList = (params) => {
  return axios({
    url: '/bms/bmsWarehouseRegion/list',
    method:'get',
    params
  })
}

// 查询已启用仓库列表
export const queryWarehouseEnableList = (params) => {
  return axios({
    url: '/bms/bmsWarehouse/enableList',
    method:'get',
    params
  })
}

// 修改用户当前的仓库
export const updateUserCurrware = (params) => {
  return axios({
    url: '/sys/user/updateCurrware',
    method:'get',
    params
  })
}

// 获取盘点详情
export const queryCheckDetail = (params) => {
  return axios({
    url: '/wms/wmsCheck/queryCheckDetail',
    method:'get',
    params
  })
}

// 分页查询植入单
export const queryImplantList = (params) => {
  return axios({
    url: '/wms/implant/list',
    method:'get',
    params
  })
}

// 通过id查询植入单详情
export const queryImplantDetail = (params) => {
  return axios({
    url: '/wms/implant/queryDetail',
    method:'get',
    params
  })
}

// 新增植入单 
export const addImplant = (data) => {
  return axios({
    url: '/wms/implant/add',
    method:'post',
    data
  })
}


// 分页查询采购单列表
export const queryPurchaseList = (params) => {
  return axios({
    url: '/wms/purOrder/list',
    method:'get',
    params
  })
}

// 通过id查询采购单详情
export const queryPurchaseDetail = (params) => {
  return axios({
    url: '/wms/purOrder/queryDetail',
    method:'get',
    params
  })
}

// 新增采购单 
export const addPurchase = (data) => {
  return axios({
    url: '/wms/purOrder/add',
    method:'post',
    data
  })
}

// 通过英克码id查详情
export const queryYkCodeDetail = (params) => {
  return axios({
    url: '/wms/wmsBarBindOrderDetail/queryById',
    method:'get',
    params
  })
}

// 获取绑定商品下绑定的英克码订单
export const queryOrderDetailList = (params) => {
  return axios({
    url: '/wms/wmsBarBindOrderDetail/list',
    method:'get',
    params
  })
}

// 盘点任务添加 /wms/wmsCheckMain/add 
export const addcheckTaskApi = (data) => {
  return axios({
    url: '/wms/wmsCheckMain/add',
    method:'post',
    data
  })
}